#ifndef __MESSAGE_CONTEXT__
#define __MESSAGE_CONTEXT__

class IListener {
public:
	~IListener() {};
	virtual int onEvent(IObject* msg)=0;
	virtual int onInvoke(IObject* msg, IObject* rmsg)=0;
};


class IContext {
public:
	virtual ~IContext() {};
	virtual int addRef()=0;
	virtual int release()=0;
	virtual int addListenser(const char* topic, IListener listener)=0;
	virtual int removeListener(const char* topic, IListener listener)=0;
	virtual int post(const char* topic, IObject* msg)=0;
	virtual int invoke(const char* topic, IObject* msg, IObject* rmsg)=0;
};

#endif 